﻿using InspectionMAC.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace InspectionMAC.SystemThread
{
    class CameraContinuesThread03
    {
        public static bool CameraContinues_Flowrec = false;
        public static Thread CameraContinuesFlow_Thread = null;
        public static int iCameraContinues_Step = 0;

        public static bool CameraContinues_Stop = false;

        public static DateTime triggerDataTime;
        public static void CameraContinues_Thread()
        {
            iCameraContinues_Step = 1;
            CameraContinues_Flowrec = true;
            CameraContinuesFlow_Thread = new Thread(CameraContinuesFlowThread);
            CameraContinuesFlow_Thread.IsBackground = true;
            CameraContinuesFlow_Thread.Start();
        }
        private static void CameraContinuesFlowThread(object obj)
        {
            while (CameraContinues_Flowrec)
            {
                switch (iCameraContinues_Step)
                {
                    case 0:
                        while (iCameraContinues_Step == 0)
                        {
                            DIO_Thread.Do[3] = 1;

                            Thread.Sleep(50);
                            DIO_Thread.Do[3] = 0;
                            Thread.Sleep(50);
                        }
                        break;
                }
            }
        }
    }
}
